package org.voidness.twittava.conversion;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import org.voidness.twittava.conversion.converters.Converter;
import org.voidness.twittava.conversion.converters.JSONConverter;
import org.voidness.twittava.conversion.converters.XMLConverter;
import org.voidness.twittava.domain.Status;
import org.voidness.twittava.domain.StatusUser;

/**
 *
 * @author void
 */
public class ConversionFactory {
    
    public static Converter getConverter(int type) {
        switch (type) {
            default:
            case Converter.JSON: return new JSONConverter();
            case Converter.XML: return new XMLConverter();
        }
    }
    
    public static Collection<Status> getFooBarData() {
        Collection<Status> statuses = new ArrayList<Status>();
        StatusUser user = new StatusUser();
        user.setName("Pedro Assuncao");
        user.setProfileImageUrl("file:///home/void/documents/wp01.by.ggarfield.jpg");
        StatusUser user2 = new StatusUser();
        user2.setName("Another twitter");
        user2.setProfileImageUrl("file:///home/void/documents/mandolux-karesansui-2560.jpg");
        statuses.add(new Status(1, "This is a longer twitter. This is a longer twitter. This is a longer twitter. This is a longer twitter. This is a longer twitter. ", new Date(new Date().getTime() - 1000), user));
        statuses.add(new Status(2, "Smaller twit :D", new Date(new Date().getTime() - 10000), user2));
        statuses.add(new Status(3, "Had a Big King for lunch. I wonder if it's good for me?", new Date(new Date().getTime() - 100000), user));
        statuses.add(new Status(4, "hehehehe", new Date(new Date().getTime() - 1000000), user2));
        statuses.add(new Status(5, "Going home...", new Date(new Date().getTime() - 10000000), user));
        statuses.add(new Status(6, "It's a longer twitter entry. But with some normal data to see if the size is appropriate for a regular entry for everyone...", new Date(new Date().getTime() - 100000000), user));
        statuses.add(new Status(7, "hehehehe", new Date(new Date().getTime() - 1000000000), user2));
        return statuses;
    }
    
}
